3 ROS2 Topics
ros2 run turtlesim turtlesim_node
ros2 run turtlesim turtle_teleop_key
rqt_graph
ros2 topic list
ros2 topic echo /turtle1/cmd_vel
• Another way to look at this is running in a new terminal (Ctr + Alt + T)
ros2 topic info /turtle1/cmd_vel
ros2 interface show geometry_msgs/msg/Twist
Vector3 linearVector3 angularros2 topic pub --once /turtle1/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 2.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 1.8}}“
--once is an optional argument meaning “publish one message then exit”.
ros2 topic pub --rate 1 /turtle1/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 2.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 1.8}}“
The difference here is the removal of the --once option and the addition of the --rate 1 option, which tells ros2 topic pub to publish the command in a steady stream at 1 Hz.
ros2 topic echo /turtle1/pose
ros2 topic hz /turtle1/pose
average rate: 59.354
min: 0.005s max: 0.027s std dev: 0.00284s window: 58
Reference : https://docs.ros.org/en/humble/Installation.html